 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>商品管理</title>
   <script src="__STATIC__/Js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
    <link rel="stylesheet" type="text/css" href="__STATIC__/hdjs/hdjs.css"/>
    <script src="__STATIC__/hdjs/hdjs.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
        .plus_minus{
            width: 20px;
        }
        table .hd-btn{
            margin: 0;
        }
        table tr a:hover{
            text-decoration: none;
        }
         .title{background:#6FB100;height:30px;color:#fff;line-height:30px;font-weight:bold;padding-left:10px;font-size:14px;}
         .title .add{float:right;}
          .title .add a{color:#fff;line-height:23px;margin-right:18px;}
        .title a:hover{text-decoration: none;}    
    </style>
    <link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.min.css"/>
</head>
<body>
<div class="title"  >商品列表
   <div class="add" > <a href="{|U:'Goods/add'}" class="glyphicon glyphicon-plus">添加商品</a></div>

</div>
<div class="wrap">
     <table class="hd-table hd-table-list">
        <thead>
        <tr>
            <td width="50">id</td>
            <td>商品名称</td>
             <td width="100">缩略图</td>
            <td width="100">商品货号</td>
             <td>市场价</td>
             <td>本店价</td>
             <td>是否上架</td>
             <td>是否新品</td>
             <td>是否热销</td>
             <td>是否精品</td>
              <td>库存</td>
            <td width="180">上架时间</td>        
            <td width="150">操作</td>
        </tr>
        </thead>
        <tbody>
        <foreach from="$data" key="$k" value="$v">
            <tr>
            <td width="50">{$v.goods_id}</td>
            <td width="100">{$v.goods_name|hd_substr:20,''}</td>
             <td width="100"><img src="__ROOT__/{$v.goods_img}" width="50" height="50" alt="" /></td>
             <td width="100">{$v.goods_sn}</td>
            <td >{$v.market_price}</td>
             <td >{$v.shop_price}</td>
             <td >{$v.is_onsale}</td>
              <td >{$v.is_new}</td>
               <td >{$v.is_hot}</td>
                <td >{$v.is_best}</td>
               <td width="100">{$v.goods_number}</td>
            <td width="180">{$v.add_time|date:'Y-m-d H:i:s',@@}</td>
           
             <td width="200">
               <a href="{|U:'Shoplist/index',array('goods_id'=>$v['goods_id'],'type_id'=>$v['type_id'])}" class="hd-btn hd-btn-success hd-btn-xm">货品列表</a>
                <a href="__CONTROLLER__/edit&goods_id={$v.goods_id}" class="hd-btn hd-btn-primary hd-btn-xm">编辑</a>
             <a href="javascript:hd_modal_del({$v.goods_id});" class="hd-btn hd-btn-danger hd-btn-xm">回收站</a>

            </td>
        </tr>
        </foreach>
        </tbody>
    </table>
    <div class="page_hdjob">
       {$page}
    </div>
</div>
<script type="text/javascript">
    function hd_modal_del(id) {
        hd_modal({
            width: 320,//宽度
            height: 150,//高度
            title: '您确实把此文件放入回收站吗？',//标题
            content: '',//提示信息
            button: true,//显示按钮
            button_success: "确定",//确定按钮文字
            button_cancel: "取消",//关闭按钮文字
            timeout: 0,//自动关闭时间 0：不自动关闭
            shade: true,//背景遮罩
            shadeOpacity: 0.4,//背景透明度
            success: function () {//点击确定后的事件
                location.href = '__CONTROLLER__'+'&a=del&goods_id='+id;
            },
            cancel: function () {//点击关闭后的事件
                
            }
        });
    }
</script>
</body>
</html>


